﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CarbohydratesEdit.aspx.cs"
    Inherits="StoragePeriod.Web.FoodTesting.CarbohydratesFood.CarbohydratesEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Vc含量检测</title>
    <link href="/Styles/MainStyle.css" rel="stylesheet" type="text/css" />
    <link href="/Scripts/artDialog/skins/default.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <style type="text/css">
        <!--
        .TitleTabs{ width:100%; height:25px; border-bottom:1px solid #3bb9f3; margin:0px auto; padding-top:10px;}
        .TitleTabs li{float:left; width:100px; height:25px; line-height:25px; margin-left:10px;}
        .TitleTabs li a{ display:block; width:100px; height:24px; line-height:24px; border:1px solid #3bb9f3; border-bottom:0px; text-align:center; background-color:#b9eefe; color:#000; font-weight:600;}
        .TitleTabs .TabsOver{border-bottom:1px solid #fff; background-color:#fff; color:#f90;}
        .Mean{ float:left; font-size:12px; font-weight:600; color:#f90;}
        -->
    </style>
    <script type="text/javascript">
        //验证控件是否为空
        function IsNotNull() {
            var b = true;
            if ($("#MainContent_txt_XGDJZ").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_m1").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_m").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_F").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V1").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V2").val() == "") {
                b = false;
            }
            if (!b) {
                alert("请完整输入参数。");
            }
            return b;
        }

        //根据检测次数 打开新窗体
        function OpenIframe(RawID, FoodTime, FoodNum) {
            window.location.href = 'CarbohydratesEdit.aspx?RawID=' + RawID + "&FoodTime=" + FoodTime + "&FoodNum=" + FoodNum + "&rid=" + Math.random();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="TitleTabs">
        <ul>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="1"?"TabsOver":""%>"
                href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',1);">
                第一次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="2"?"TabsOver":""%>"
                href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',2);">
                第二次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="3"?"TabsOver":""%>"
                href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',3);">
                第三次检测</a></li>
        </ul>
    </div>
    <div style="width: 700px; padding-top: 20px;">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="80px">吸光度均值:</td>
                            <td colspan="3"><asp:TextBox Style="width: 220px;" ID="txt_XGDJZ" runat="server" Enabled="true" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>标曲对应葡萄糖含量(X):</td>
                            <td colspan="3"><asp:TextBox Style="width: 220px;" ID="txt_x" runat="server" Enabled="false" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right">m1:</td>
                            <td><asp:TextBox Style="width: 100px;" ID="txt_m1" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            <td align="right">m:</td>
                            <td><asp:TextBox Style="width: 100px;" ID="txt_m" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right">V:</td>
                            <td colspan="3"><asp:TextBox Style="width: 100px;" ID="txt_V" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                    </table>
                </td>
                <td valign="top" style="padding-left: 10px; width: 350px;">
                    说明:<br />
                    X:原料中还原糖的含量（以葡萄糖计）<br />
                    m1:碱性酒石酸铜溶液（甲、乙液各半）相当于某种还原糖的质量，mg<br />
                    m:原料质量，g<br />
                    V:测定时平均消耗试样溶液的体积，ml
                </td>
            </tr>
            <tr>
                <td colspan="2" style="padding-bottom: 20px;">
                    X计算公式:X=[m1/(m*v/250*1000)]*100
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 700px; padding-top: 20px; border-top: 1px solid #ccc;">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="80px" align="right">F:</td>
                            <td><asp:TextBox Style="width: 100px;" ID="txt_F" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            <td width="50px" align="right">V1:</td>
                            <td><asp:TextBox Style="width: 100px;" ID="txt_V1" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right">V2:</td>
                            <td><asp:TextBox Style="width: 100px;" ID="txt_V2" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                        </tr>
                    </table>
                </td>
                <td valign="top" style="padding-left: 10px; width: 350px;">
                    说明:<br />
                    F:碱性酒石酸铜溶液（甲、乙液各半）相当于某种还原糖的质量，mg<br />
                    V1:原料处理液总体积（即续滤液的体积）<br />
                    V2:测定时平均消耗试样溶液的体积，ml
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    总糖含量=[F/m*(50/V1)*(V2/100)*1000]*100
                </td>
            </tr>
        </table>
    </div>
    <div class="aui_buttons">
        <div class="Mean">
            平均值：<asp:Label ID="labMean" runat="server" Text=""></asp:Label>
        </div>
        <asp:Button Text="提交" runat="server" CssClass="aui_state_highlight" ID="btPost" OnClientClick="return IsNotNull()" OnClick="btPost_Click" />
        <asp:Button Text="计算平均值" runat="server" CssClass="aui_state_highlight" ID="btnMean" OnClick="btnMean_Click" />
    </div>
    </form>
</body>
</html>
